﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Drawing;

namespace ArgusLib.Fractals.OrbitFractals
{
	public class RenderParameterEscapeTimeSmoother : IRenderParameter
	{
		public double Frequency { get; set; }
		public double NumberOfPeriods { get; set; }
		public double Translation { get; set; }
		public bool AutoSetFrequency { get; set; }
		public Color SetColor { get; set; }
		public Color BackgroundColor { get; set; }
		public Colorings Coloring { get; set; }
		public Color UserColor1 { get; set; }
		public Color UserColor2 { get; set; }

		public RenderParameterEscapeTimeSmoother()
		{
			this.NumberOfPeriods = 4;
			this.Translation = 0;
			this.Frequency = 0;
			this.AutoSetFrequency = true;
			this.SetColor = Color.Black;
			this.BackgroundColor = Color.White;
			this.Coloring = Colorings.HSV;
			this.UserColor1 = Color.Blue;
			this.UserColor2 = Color.White;
		}

		public RenderParameterEscapeTimeSmoother Clone()
		{
			RenderParameterEscapeTimeSmoother clone = new RenderParameterEscapeTimeSmoother()
			{
				AutoSetFrequency = this.AutoSetFrequency,
				Frequency = this.Frequency,
				Translation = this.Translation,
				NumberOfPeriods = this.NumberOfPeriods,
				SetColor = this.SetColor,
				BackgroundColor = this.BackgroundColor,
				Coloring = this.Coloring,
				UserColor1 = this.UserColor1,
				UserColor2 = this.UserColor2
			};
			return clone;
		}

		object ICloneable.Clone()
		{
			return this.Clone();
		}

		public enum Colorings : byte
		{
			HSV,
			AllColors,
			RedYellow,
			BluePurple,
			UserDefined1,
			UserDefined2
		}
	}
}
